home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1403.txt < prev    next >
Text File  |  1997-04-01  |  36KB  |  955 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                       K.  Varadhan
  8. Request for Comments: 1403                                        OARnet
  9. Obsoletes: 1364                                             January 1993
  10.  
  11.  
  12.                           BGP OSPF Interaction
  13.  
  14. Status of this Memo
  15.  
  16.    This RFC specifies an IAB standards track protocol for the Internet
  17.    community, and requests discussion and suggestions for improvements.
  18.    Please refer to the current edition of the "IAB Official Protocol
  19.    Standards" for the standardization state and status of this protocol.
  20.    Distribution of this memo is unlimited.
  21.  
  22. Abstract
  23.  
  24.    This memo defines the various criteria to be used when designing an
  25.    Autonomous System Border Routers (ASBR) that will run BGP with other
  26.    ASBRs external to the AS and OSPF as its IGP.  This is a
  27.    republication of RFC 1364 to correct some editorial problems.
  28.  
  29. Table of Contents
  30.  
  31.  1.  Introduction ....................................................  2
  32.  2.  Route Exchange ..................................................  3
  33.  2.1.  Exporting OSPF routes into BGP ................................  3
  34.  2.2.  Importing BGP routes into OSPF ................................  4
  35.  3.  BGP Identifier and OSPF router ID ...............................  5
  36.  4.  Setting OSPF tags, BGP ORIGIN and AS_PATH attributes ............  6
  37.  4.1.  Semantics of the characteristics bits .........................  8
  38.  4.2.  Configuration parameters for setting the OSPF tag .............  9
  39.  4.3.  Manually configured tags ...................................... 10
  40.  4.4.  Automatically generated tags .................................. 10
  41.  4.4.1.  Routes with incomplete path information, PathLength = 0 ..... 10
  42.  4.4.2.  Routes with incomplete path information, PathLength = 1 ..... 11
  43.  4.4.3.  Routes with incomplete path information, PathLength >= 1 .... 11
  44.  4.4.4.  Routes with complete path information, PathLength = 0 ....... 12
  45.  4.4.5.  Routes with complete path information, PathLength = 1 ....... 12
  46.  4.4.6.  Routes with complete path information, PathLength >= 1 ...... 13
  47.  4.5.  Miscellaneous tag settings .................................... 13
  48.  4.6.  Summary of the TagType field setting .......................... 14
  49.  5.  Setting OSPF Forwarding Address and BGP NEXT_HOP attribute ...... 14
  50.  6.  Security Considerations ......................................... 15
  51.  7.  Acknowledgements ................................................ 15
  52.  8.  Bibliography .................................................... 16
  53.  9.  Author's Address ................................................ 17
  54.  
  55.  
  56.  
  57.  
  58. Varadhan                                                        [Page 1]
  59.  
  60. RFC 1403                  BGP OSPF Interaction              January 1993
  61.  
  62.  
  63. 1.  Introduction
  64.  
  65.    This document defines the various criteria to be used when designing
  66.    an Autonomous System Border Routers (ASBR) that will run BGP
  67.    [RFC1267] with other ASBRs external to the AS, and OSPF [RFC1247] as
  68.    its IGP.
  69.  
  70.    This document defines how the following fields in OSPF and attributes
  71.    in BGP are to be set when interfacing between BGP and OSPF at an
  72.    ASBR:
  73.  
  74.            OSPF cost and type      vs. BGP INTER-AS METRIC
  75.            OSPF tag                vs. BGP ORIGIN and AS_PATH
  76.            OSPF Forwarding Address vs. BGP NEXT_HOP
  77.  
  78.    For a more general treatise on routing and route exchange problems,
  79.    please refer to [ROUTE-LEAKING] and [NEXT-HOP] by Philip Almquist.
  80.  
  81.    This document uses the two terms "Autonomous System" and "Routing
  82.    Domain".  The definitions for the two are below:
  83.  
  84.    The term Autonomous System is the same as is used in the BGP-3 RFC
  85.    [RFC1267], given below:
  86.  
  87.         "The use of the term Autonomous System here stresses the fact
  88.         that, even when multiple IGPs and metrics are used, the
  89.         administration of an AS appears to other ASs to have a single
  90.         coherent interior routing plan and presents a consistent picture
  91.         of what networks are reachable through it.  From the standpoint
  92.         of exterior routing, an AS can be viewed as monolithic:
  93.         reachability to networks directly connected to the AS must be
  94.         equivalent from all border gateways of the AS."
  95.  
  96.    The term Routing Domain was first used in [ROUTE-LEAKING] and is
  97.    given below:
  98.  
  99.           "A Routing Domain is a collection of routers which coordinate
  100.           their routing knowledge using a single (instance of) a routing
  101.           protocol."
  102.  
  103.      This document follows the conventions embodied in the Host
  104.      Requirements RFCs [RFC1122, RFC1123], when using the terms "MUST",
  105.      "SHOULD", and "MAY" for the various requirements.
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Varadhan                                                        [Page 2]
  115.  
  116. RFC 1403                  BGP OSPF Interaction              January 1993
  117.  
  118.  
  119. 2.  Route Exchange
  120.  
  121.    This section discusses the constraints that must be met to exchange
  122.    routes between an external BGP session with a peer from another AS
  123.    and internal OSPF routes.
  124.  
  125.    BGP does not carry subnet information in routing updates.  Therefore,
  126.    when referring to a subnetted network in the OSPF routing domain, we
  127.    consider the equivalent network route in the context of BGP.
  128.    Multiple subnet routes for a subnetted network in OSPF are collapsed
  129.    into one network route when exported into BGP.
  130.  
  131.    2.1.  Exporting OSPF routes into BGP
  132.  
  133.       1.   The administrator MUST be able to selectively export OSPF
  134.            routes into BGP via an appropriate filter mechanism.
  135.  
  136.            This filter mechanism MUST support such control with the
  137.            granularity of a single network.
  138.  
  139.            Additionally, the administrator MUST be able to filter based
  140.            on the OSPF tag and the various sub-fields of the OSPF tag.
  141.            The settings of the tag and the sub-fields are defined in
  142.            section 4 in more detail.
  143.  
  144.            o    The default MUST be to export no routes from OSPF into
  145.                 BGP.  A single configuration parameter MUST permit all
  146.                 OSPF inter-area and intra-area routes to be exported
  147.                 into BGP.
  148.  
  149.                 OSPF external routes of type 1 and type 2 MUST never be
  150.                 exported into BGP unless they are explicitly configured.
  151.  
  152.       2.   When configured to export a network, the ASBR MUST advertise
  153.            a network route for a subnetted network, as long as at least
  154.            one subnet in the subnetted network is reachable via OSPF.
  155.  
  156.       3.   The network administrator MUST be able to statically
  157.            configure the BGP attribute INTER-AS METRIC to be used for
  158.            any network route.
  159.  
  160.            o    By default, the INTER_AS METRIC MUST not be set.  This
  161.                 is because the INTER_AS METRIC is an optional attribute
  162.                 in BGP.
  163.  
  164.            Explanatory text: The OSPF cost and the BGP INTER-AS METRIC
  165.            are of different widths.  The OSPF cost is a two level
  166.            metric.  The BGP INTER-AS METRIC is only an optional non-
  167.  
  168.  
  169.  
  170. Varadhan                                                        [Page 3]
  171.  
  172. RFC 1403                  BGP OSPF Interaction              January 1993
  173.  
  174.  
  175.            transitive attribute.  Hence, a more complex BGP INTER-AS
  176.            METRIC-OSPF cost mapping scheme is not necessary.
  177.  
  178.       4.   When an ASBR is advertising an OSPF route to network Y to
  179.            external BGP neighbours and learns that the route has become
  180.            unreachable, the ASBR MUST immediately propagate this
  181.            information to the external BGP neighbours.
  182.  
  183.       5.   An implementation of BGP and OSPF on an ASBR MUST have a
  184.            mechanism to set up a minimum amount of time that must elapse
  185.            between the learning of a new route via OSPF and subsequent
  186.            advertisement of the route via BGP to the external
  187.            neighbours.
  188.  
  189.            o    The default value for this setting MUST be 0, indicating
  190.                 that the route is to be advertised to the neighbour BGP
  191.                 peers instantly.
  192.  
  193.                 Note that [RFC1267] mandates a mechanism to dampen the
  194.                 inbound advertisements from adjacent neighbours.
  195.  
  196.    2.2.  Importing BGP routes into OSPF
  197.  
  198.       1.   BGP implementations SHOULD allow an AS to control
  199.            announcements of BGP-learned routes into OSPF.
  200.            Implementations SHOULD support such control with the
  201.            granularity of a single network.  Implementations SHOULD also
  202.            support such control with the granularity of an autonomous
  203.            system, where the autonomous system may be either the
  204.            autonomous system that originated the route or the autonomous
  205.            system that advertised the route to the local system
  206.            (adjacent autonomous system).
  207.  
  208.            o    The default MUST be to export no routes from BGP into
  209.                 OSPF.  Administrators must configure every route they
  210.                 wish to import.
  211.  
  212.                 A configuration parameter MAY allow an administrator to
  213.                 configure an ASBR to import all the BGP routes into the
  214.                 OSPF routing domain.
  215.  
  216.       2.   The administrator MUST be able to configure the OSPF cost and
  217.            the OSPF metric type of every route imported into OSPF.
  218.  
  219.            o    The OSPF cost MUST default to 1; the OSPF metric type
  220.                 MUST default to type 2.
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Varadhan                                                        [Page 4]
  227.  
  228. RFC 1403                  BGP OSPF Interaction              January 1993
  229.  
  230.  
  231.       3.   Routes learned via BGP from peers within the same AS MUST not
  232.            be imported into OSPF.
  233.  
  234.       4.   The ASBR MUST never generate a default route into the OSPF
  235.            routing domain unless explicitly configured to do so.
  236.  
  237.            A possible criterion for generating default into an IGP is to
  238.            allow the administrator to specify a set of (network route,
  239.            AS_PATH, default route cost, default route type) tuples.  If
  240.            the ASBR learns of the network route for an element of the
  241.            set, with the corresponding AS_PATH, then it generates a
  242.            default route into the OSPF routing domain, with cost
  243.            "default route cost" and type, "default route type".  The
  244.            lowest cost default route will then be injected into the OSPF
  245.            routing domain.
  246.  
  247.            This is the recommended method for originating default routes
  248.            in the OSPF routing domain.
  249.  
  250. 3.  BGP Identifier and OSPF router ID
  251.  
  252.    The BGP identifier MUST be the same as the OSPF router id at all
  253.    times that the router is up.
  254.  
  255.    This characteristic is required for two reasons.
  256.  
  257.      i    Synchronisation between OSPF and BGP
  258.  
  259.           Consider the scenario in which 3 ASBRs, RT1, RT2, and RT3,
  260.           belong to the same autonomous system.
  261.  
  262.  
  263.                                      +-----+
  264.                                      | RT3 |
  265.                                      +-----+
  266.                                         |
  267.  
  268.                           Autonomous System running OSPF
  269.  
  270.                                  /               \
  271.                              +-----+          +-----+
  272.                              | RT1 |          | RT2 |
  273.                              +-----+          +-----+
  274.  
  275.  
  276.           Both RT1 and RT2 have routes to an external network X and
  277.           import it into the OSPF routing domain.  RT3 is advertising
  278.           the route to network X to other external BGP speakers.  RT3
  279.  
  280.  
  281.  
  282. Varadhan                                                        [Page 5]
  283.  
  284. RFC 1403                  BGP OSPF Interaction              January 1993
  285.  
  286.  
  287.           must use the OSPF router ID to determine whether it is using
  288.           RT1 or RT2 to forward packets to network X and hence build the
  289.           correct AS_PATH to advertise to other external speakers.
  290.  
  291.           More precisely, RT3 must determine which ASBR it is using to
  292.           reach network X by matching the OSPF router ID for its route
  293.           to network X with the BGP Identifier of one of the ASBRs, and
  294.           use the corresponding route for further advertisement to
  295.           external BGP peers.
  296.  
  297.      ii   It will be convenient for the network administrator looking at
  298.           an ASBR to correlate different BGP and OSPF routes based on
  299.           the identifier.
  300.  
  301. 4.  Setting OSPF tags, BGP ORIGIN and AS_PATH attributes
  302.  
  303.    The OSPF external route tag is a "32-bit field attached to each
  304.    external route . . . It may be used to communicate information
  305.    between AS boundary routers; the precise nature of such information
  306.    is outside the scope of [the] specification." [RFC1247]
  307.  
  308.    OSPF imports information from various routing protocols at all its
  309.    ASBRs.  In some instances, it is possible to use protocols other than
  310.    EGP or BGP across autonomous systems.  It is important, in BGP, to
  311.    differentiate between routes that are external to the OSPF routing
  312.    domain but must be considered internal to the AS, as opposed to
  313.    routes that are external to the AS.
  314.  
  315.    Routes that are internal to the AS and that may or may not be
  316.    external to the OSPF routing domain will not come to the various BGP
  317.    speakers from other BGP speakers within the same autonomous system
  318.    via BGP.  Therefore, ASBRs running BGP must have knowledge of this
  319.    class of routes so that they can advertise these routes to the
  320.    various external AS without waiting for BGP updates from other BGP
  321.    speakers within the same autonomous system about these routes.
  322.  
  323.    Additionally, in the specific instance of an AS intermixing routers
  324.    running EGP and BGP as exterior gateway routing protocols and using
  325.    OSPF as an IGP, then within the autonomous system, it may not be
  326.    necessary to run BGP with every ASBR running EGP and not running BGP,
  327.    if this information can be carried in the OSPF tag field.
  328.  
  329.    We use the external route tag field in OSPF to intelligently set the
  330.    ORIGIN and AS_PATH attributes in BGP.  Both the ORIGIN and AS_PATH
  331.    attributes are well-known, mandatory attributes in BGP.  The exact
  332.    mechanism for setting the tags is defined below.
  333.  
  334.    The tag is broken up into sub-fields shown below.  The various sub-
  335.  
  336.  
  337.  
  338. Varadhan                                                        [Page 6]
  339.  
  340. RFC 1403                  BGP OSPF Interaction              January 1993
  341.  
  342.  
  343.    fields specify the characteristics of the route imported into the
  344.    OSPF routing domain.
  345.  
  346.    The high bit of the OSPF tag is known as the "Automatic" bit.  When
  347.    this bit is set to 1, the following sub-fields apply:
  348.  
  349.       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  350.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  351.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  352.      |a|c|p l|     ArbitraryTag      |       AutonomousSystem        |
  353.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  354.  
  355.  
  356.      a    is 1 bit called the Automatic bit, indicating that the
  357.           Completeness and PathLength bits have been generated
  358.           automatically by a router.  The meaning of this characteristic
  359.           and its setting are defined below.
  360.  
  361.      c    is 1 bit of Completeness information.  The meaning of this
  362.           characteristic and its settings are defined below.
  363.  
  364.      pl   are 2 bits of PathLength information.  The meaning of this
  365.           characteristic and its setting are defined below.
  366.  
  367.      ArbitraryTag
  368.           is 12 bits of tag information, which defaults to 0 but can be
  369.           configured to anything else.
  370.  
  371.      AutonomousSystem (or ``AS'')
  372.           is 16 bits, indicating the AS number corresponding to the
  373.           route, 0 if the route is to be considered as part of the local
  374.           AS.
  375.  
  376.           local_AS
  377.                The term `local_AS' refers to the AS number of the local
  378.                OSPF routing domain.
  379.  
  380.           next_hop_AS
  381.                `next_hop_AS' refers to the AS number of an external BGP
  382.                peer.
  383.  
  384.      When the Automatic bit is set to 0, the following sub-fields apply:
  385.  
  386.       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  387.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  388.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  389.      |a|                          LocalInfo                          |
  390.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  391.  
  392.  
  393.  
  394. Varadhan                                                        [Page 7]
  395.  
  396. RFC 1403                  BGP OSPF Interaction              January 1993
  397.  
  398.  
  399.      a    is 1 bit called the Automatic bit, set to 0.
  400.  
  401.      LocalInfo
  402.           is 31 bits of an arbitrary value, manually configured by the
  403.           network administrator.
  404.  
  405.      The format of the tag for various values of the characteristics
  406.      bits is defined below.
  407.  
  408.    4.1.  Semantics of the characteristics bits
  409.  
  410.       The Completeness and PathLength characteristics bits define the
  411.       characteristic of the route imported into OSPF from other ASBRs in
  412.       the autonomous system.  This setting is then used to set the
  413.       ORIGIN and NEXT_HOP attributes when re-exporting these routes to
  414.       an external BGP speaker.
  415.  
  416.       o    The Automatic characteristic bit is set when the Completeness
  417.            and PathLength characteristics bits are automatically set by
  418.            a border router.
  419.  
  420.            For backward compatibility, the Automatic bit must default to
  421.            0 and the network administrator must have a mechanism to
  422.            enable automatic tag generation.  Nothing must be inferred
  423.            about the characteristics of the OSPF route from the tag
  424.            bits, unless the tag has been automatically generated.
  425.  
  426.       o    The Completeness characteristic bit is set when the source of
  427.            the incoming route is known precisely, for instance, from an
  428.            IGP within the local autonomous system or EGP at one of the
  429.            autonomous system's boundaries.  It refers to the status of
  430.            the path information carried by the routing protocol.
  431.  
  432.       o    The PathLength characteristic sub-field is set depending on
  433.            the length of the AS_PATH that the protocol could have
  434.            carried when importing the route into the OSPF routing
  435.            domain.  The length bits will indicate whether the AS_PATH
  436.            attribute for the length is zero, one, or greater than one.
  437.  
  438.            Routes imported from an IGP will usually have an AS_PATH of
  439.            length of 0, routes imported from an EGP will have an AS_PATH
  440.            of length 1, BGP and routing protocols that support complete
  441.            path information, either as AS_PATHs or routing domain paths,
  442.            will indicate a path greater than 1.
  443.  
  444.            The OSPF tag is not wide enough to carry path information
  445.            about routes that have an associated PathLength greater than
  446.            one.  Path information about these routes will have to be
  447.  
  448.  
  449.  
  450. Varadhan                                                        [Page 8]
  451.  
  452. RFC 1403                  BGP OSPF Interaction              January 1993
  453.  
  454.  
  455.            carried via BGP to other ASBRs within the same AS.  Such
  456.            routes must not be exported from OSPF into BGP.
  457.  
  458.  
  459.    4.2.  Configuration parameters for setting the OSPF tag
  460.  
  461.       o    There MUST be a mechanism to enable automatic generation of
  462.            the tag characteristic bits.
  463.  
  464.       o    Configuration of an ASBR running OSPF MUST include the
  465.            capability to associate a tag value, for the ArbitraryTag, or
  466.            LocalInfo sub-field of the OSPF tag, with each instance of a
  467.            routing protocol.
  468.  
  469.       o    Configuration of an ASBR running OSPF MUST include the
  470.            capability to associate an AS number with each instance of a
  471.            routing protocol.
  472.  
  473.            Associating an AS number with an instance of an IGP is
  474.            equivalent to flagging those set of routes imported from the
  475.            IGP to be external routes outside the local autonomous
  476.            system.
  477.  
  478.            Specifically, when the IGP is RIP [RFC1058, RFC1388], it
  479.            SHOULD be possible to associate a tag and/or an AS number
  480.            with every interface running RIP on the ASBR.
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Varadhan                                                        [Page 9]
  507.  
  508. RFC 1403                  BGP OSPF Interaction              January 1993
  509.  
  510.  
  511.    4.3.  Manually configured tags
  512.  
  513.       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  514.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  515.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  516.      |0|                          LocalInfo                          |
  517.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  518.  
  519.       This tag setting corresponds to the administrator manually setting
  520.       the  tag bits.  Nothing MUST be inferred about the characteristics
  521.       of the route corresponding to this tag setting.
  522.  
  523.       For backward compatibility with existing implementations  of  OSPF
  524.       currently  deployed in the field, this MUST be the default setting
  525.       for importing routes into the OSPF routing domain.  There MUST  be
  526.       a  mechanism  to  enable  automatic  tag  generation  for imported
  527.       routes.
  528.  
  529.       The OSPF tag to BGP attribute mappings for these routes MUST be
  530.  
  531.       Automatic=0, LocalInfo=Arbitrary_Value =>
  532.                                  ORIGIN=<INCOMPLETE>, AS_PATH=<local_AS>
  533.  
  534.    4.4.  Automatically generated tags
  535.  
  536.       4.4.1.  Routes with incomplete path information, PathLength = 0.
  537.  
  538.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  539.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  540.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  541.       |1|0|0|0|     ArbitraryTag      |       AutonomousSystem        |
  542.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  543.  
  544.          These are routes imported from routing protocols with
  545.          incomplete path information and cannot or may not carry the
  546.          neighbour AS or AS path as part of the routing information.
  547.  
  548.          The OSPF tag to BGP attribute mappings for these routes MUST be
  549.  
  550.          Automatic=1, Completeness=0, PathLength=00, AS=0 =>
  551.                                         ORIGIN=<EGP>, AS_PATH=<local_AS>
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Varadhan                                                       [Page 10]
  563.  
  564. RFC 1403                  BGP OSPF Interaction              January 1993
  565.  
  566.  
  567.       4.4.2  Routes with incomplete path information, PathLength = 1.
  568.  
  569.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  570.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  571.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  572.       |1|0|0|1|     ArbitraryTag      |       AutonomousSystem        |
  573.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  574.  
  575.          These are routes imported from routing protocols with
  576.          incomplete path information.  The neighbour AS is carried in
  577.          the routing information.
  578.  
  579.          The OSPF tag to BGP attribute mappings for these routes MUST be
  580.  
  581.          Automatic=1, Completeness=0, PathLength=01, AS=<next_hop_AS>
  582.                         => ORIGIN=<EGP>, AS_PATH=<local_AS, next_hop_AS>
  583.  
  584.          This setting SHOULD be used for importing EGP routes into the
  585.          OSPF routing domain.  This setting MAY also be used when
  586.          importing BGP routes whose ORIGIN=<EGP> and
  587.          AS_PATH=<next_hop_AS>;  if the BGP learned route has no other
  588.          transitive attributes, then its propagation via BGP to ASBRs
  589.          internal to the AS MAY be suppressed.
  590.  
  591.       4.4.3.  Routes with incomplete path information, PathLength >= 1.
  592.  
  593.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  594.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  595.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  596.       |1|0|1|0|     ArbitraryTag      |       AutonomousSystem        |
  597.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  598.  
  599.          These are routes imported from routing protocols with truncated
  600.          path information.
  601.  
  602.          The OSPF tag to BGP attribute mappings for these routes MUST be
  603.  
  604.          Automatic=1, Completeness=0, PathLength=10, AS=don't care
  605.  
  606.          These are imported by a border router, which is running BGP to
  607.          a stub domain, and not running BGP to other ASBRs in the same
  608.          AS.  This causes a truncation of the AS_PATH.  These routes
  609.          MUST not be re-exported into BGP at another ASBR.
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Varadhan                                                       [Page 11]
  619.  
  620. RFC 1403                  BGP OSPF Interaction              January 1993
  621.  
  622.  
  623.       4.4.4.  Routes with complete path information, PathLength = 0.
  624.  
  625.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  626.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  627.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  628.       |1|1|0|0|     ArbitraryTag      |       AutonomousSystem        |
  629.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  630.  
  631.          These are routes imported from routing protocols with either
  632.          complete path information or are known to be complete through
  633.          means other than that carried by the routing protocol.
  634.  
  635.          The OSPF tag to BGP attribute mappings for these routes MUST be
  636.  
  637.          Automatic=1, Completeness=1, PathLength=00, AS=0
  638.                                      => ORIGIN=<EGP>, AS_PATH=<local_AS>
  639.  
  640.          This SHOULD be used for importing routes into OSPF from an IGP.
  641.  
  642.       4.4.5.  Routes with complete path information, PathLength = 1.
  643.  
  644.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  645.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  646.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  647.       |1|1|0|1|     ArbitraryTag      |       AutonomousSystem        |
  648.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  649.  
  650.          These are routes imported from routing protocols with either
  651.          complete path information, or are known to be complete through
  652.          means other than that carried by the routing protocol.  The
  653.          routing protocol also has additional information about the
  654.          neighbour AS of the route.
  655.  
  656.          The OSPF tag to BGP attribute mappings for these routes MUST be
  657.  
  658.          Automatic=1, Completeness=1, PathLength=01, AS=next_hop_AS
  659.                         => ORIGIN=<IGP>, AS_PATH=<local_AS, next_hop_AS>
  660.  
  661.          This setting SHOULD be used when the administrator explicitly
  662.          associates an AS number with an instance of an IGP.  This
  663.          setting MAY also be used when importing BGP routes whose
  664.          ORIGIN=<IGP> and AS_PATH=<next_hop_AS>;  if the BGP learned
  665.          route has no other transitive attributes, then its propagation
  666.          via BGP to other ASBRs internal to the AS MAY be suppressed.
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Varadhan                                                       [Page 12]
  675.  
  676. RFC 1403                  BGP OSPF Interaction              January 1993
  677.  
  678.  
  679.       4.4.6.  Routes with complete path information, PathLength >= 1.
  680.  
  681.        0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  682.        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  683.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  684.       |1|1|1|0|     ArbitraryTag      |       AutonomousSystem        |
  685.       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  686.  
  687.          These are routes imported from routing protocols with complete
  688.          path information and carry the AS path information as part of
  689.          the routing information.
  690.  
  691.          The OSPF tag MUST be set to
  692.  
  693.          Automatic=1, Completeness=1, PathLength=10, AS=don't care
  694.  
  695.          These routes MUST not be exported into BGP because these routes
  696.          are already imported from BGP into the OSPF RD.  Hence, it is
  697.          assumed that the BGP speaker will convey this information to
  698.          other BGP speakers within the same AS via BGP.  An ASBR
  699.          learning of such a route MUST wait for the BGP update from its
  700.          internal neighbours before advertising this route to external
  701.          BGP peers.
  702.  
  703.          Note that an implementation MAY import BGP routes with a path
  704.          length of 1 and no other transitive attributes directly into
  705.          OSPF and not send these routes via BGP to ASBRs within the same
  706.          AS.  In this situation, it MUST use tag settings corresponding
  707.          to 4.4.2, or 4.4.5.
  708.  
  709.    4.5.  Miscellaneous tag settings
  710.  
  711.       0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
  712.       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  713.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  714.      |1|x|1|1|              Reserved  for  future  use               |
  715.      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  716.  
  717.       The value of PathLength=11 is reserved during automatic tag
  718.       generation.  Routers MUST not generate such a tag when importing
  719.       routes into the OSPF routing domain.  ASBRs MUST ignore tags which
  720.       indicate a PathLength=11.
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Varadhan                                                       [Page 13]
  731.  
  732. RFC 1403                  BGP OSPF Interaction              January 1993
  733.  
  734.  
  735.    4.6.  Summary of the tag sub-field setting
  736.  
  737.       The following table summarises the various combinations of
  738.       automatic tag settings for the Completeness and PathLength sub-
  739.       field of the OSPF tag and the default behaviour permitted for each
  740.       setting.
  741.  
  742.                   Completeness := 0 | 1
  743.                   PathLength := 00 | 01 | 10 | 11
  744.                   ORIGIN := <INCOMPLETE> | <IGP> | <EGP>
  745.                   AS_PATH := valid AS path settings as defined in BGP
  746.  
  747. PathLength ==> 00               01                   10            11
  748. Completeness
  749.   ||     +--------------------------------------------------------------
  750.   vv     |
  751.   =  NO  |    <EGP>            <EGP>             never export   reserved
  752.          |  <local_AS>  <local_AS,next_hop_AS>
  753.          |
  754.   = YES  |    <IGP>            <IGP>             out of band    reserved
  755.          |  <local_AS>  <local_AS,next_hop_AS>
  756.          |
  757.  
  758.       The "out of band" in the table above implies that OSPF will not be
  759.       able to carry everything that BGP needs in its routing
  760.       information.  Therefore, some other means must be found to carry
  761.       this information.  In BGP, this is done by running BGP to other
  762.       ASBRs within the same AS.
  763.  
  764. 5.  Setting OSPF Forwarding Address and BGP NEXT_HOP attribute
  765.  
  766.    Forwarding addresses are used to avoid extra hops between multiple
  767.    routers that share a common network and that speak different routing
  768.    protocols with each other.
  769.  
  770.    Both BGP and OSPF have equivalents of forwarding addresses.  In BGP,
  771.    the NEXT_HOP attribute is a well-known, mandatory attribute.  OSPF
  772.    has a Forwarding address field.  We will discuss how these are to be
  773.    filled in various situations.
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Varadhan                                                       [Page 14]
  787.  
  788. RFC 1403                  BGP OSPF Interaction              January 1993
  789.  
  790.  
  791.  
  792.    Consider the 4 router situation below:
  793.  
  794.    RT1 and RT2 are in one autonomous system, RT3 and RT4 are in another.
  795.    RT1 and RT3 are talking BGP with each other.
  796.    RT3 and RT4 are talking OSPF with each other.
  797.  
  798.             +-----+                 +-----+
  799.             | RT1 |                 | RT2 |
  800.             +-----+                 +-----+
  801.                |                       |            common network
  802.             ---+-----------------------+--------------------------
  803.                  <BGP> |                       |
  804.                     +-----+     <OSPF>      +-----+
  805.                     | RT3 |                 | RT4 |
  806.                     +-----+                 +-----+
  807.  
  808.  
  809.      - Importing network X to OSPF:
  810.           Consider an external network X, learnt via BGP from RT1.
  811.  
  812.           RT3 MUST always fill the OSPF Forwarding Address with the BGP
  813.           NEXT_HOP attribute for the route to network X.
  814.  
  815.      - Exporting network Y to BGP:
  816.           Consider a network Y, internal to the OSPF routing domain,
  817.           RT3's route to network Y is via RT4, and network Y is to be
  818.           exported via BGP to RT1.
  819.  
  820.           If network Y is not a subnetted network, RT3 MUST fill the
  821.           NEXT_HOP attribute for network Y with the address of RT4.
  822.           This is to avoid requiring packets to take an extra hop
  823.           through RT3 when traversing the AS boundary.  This is similar
  824.           to the concept of indirect neighbour support in EGP [RFC888,
  825.           RFC827].
  826.  
  827. 6.  Security Considerations
  828.  
  829.    Security issues are not discussed in this memo.
  830.  
  831. 7.  Acknowledgements
  832.  
  833.    I would like to thank Yakov Rekhter, Jeff Honig, John Moy, Tony Li,
  834.    Dennis Ferguson, and Phil Almquist for their help and suggestions in
  835.    writing this document, without which I could not have written this
  836.    document.  I would also like to thank them for giving me the
  837.    opportunity to write this document, and putting up with my
  838.    muddlements through various phases of this document.
  839.  
  840.  
  841.  
  842. Varadhan                                                       [Page 15]
  843.  
  844. RFC 1403                  BGP OSPF Interaction              January 1993
  845.  
  846.  
  847.    I would also like to thank the countless number of people from the
  848.    OSPF and BGP working groups who have offered numerous suggestions and
  849.    comments on the different stages of this document.
  850.  
  851.    Thanks also to Bob Braden, who went through the document thoroughly,
  852.    and came back with questions and comments, which were very useful.
  853.    These suggestions have also been carried over into the next version
  854.    of this document for dealing with BGP 4 and OSPF.
  855.  
  856. 8.  Bibliography
  857.  
  858.    [RFC827]  Rosen, E., "Exterior Gateway Protocol (EGP)", RFC 827,
  859.              BBN, October 1982.
  860.  
  861.    [RFC888]  Seamonson, L., and E. Rosen, "STUB Exterior Gateway
  862.              Protocol", RFC 888, BBN, January 1984.
  863.  
  864.    [RFC1058]  Hedrick, C., "Routing Information Protocol", STD 34,
  865.               RFC 1058, Rutgers University, June 1988.
  866.  
  867.    [RFC1388]  Malkin, G., "RIP Version 2 - Carrying Additional
  868.               Information", RFC 1388, Xylogics, Inc., January 1993.
  869.  
  870.    [RFC1122]  Braden, R., Editor, "Requirements for Internet Hosts -
  871.               Communication Layers, STD 3, RFC 1122,
  872.               USC/Information Sciences Institute, October 1989.
  873.  
  874.    [RFC1123]  Braden, R., Editor, "Requirements for Internet Hosts -
  875.               Application and Support", STD 3, RFC 1123,
  876.               USC/Information Sciences Institute, October 1989.
  877.  
  878.    [RFC1267]  Lougheed, K., and Y. Rekhter, "A Border Gateway
  879.               Protocol 3 (BGP-3)", RFC 1267, cisco Systems,
  880.               T.J. Watson Research Center, IBM Corp., October 1991.
  881.  
  882.    [RFC1268]  Rekhter, Y., and P. Gross, Editors, "Application of the
  883.               Border Gateway Protocol in the Internet", RFC 1268,
  884.               T.J. Watson Research Center, IBM Corp., ANS, October 1991.
  885.  
  886.    [RFC1247]  Moy, J., "The OSPF Specification - Version 2:", RFC 1247,
  887.               Proteon, January 1991.
  888.  
  889.    [ROUTE-LEAKING]  Almquist, P., "Ruminations on Route Leaking",
  890.                     Work in Progress.
  891.  
  892.    [NEXT-HOP]  Almquist, P., "Ruminations on the Next Hop",
  893.                Work in Progress.
  894.  
  895.  
  896.  
  897.  
  898. Varadhan                                                       [Page 16]
  899.  
  900. RFC 1403                  BGP OSPF Interaction              January 1993
  901.  
  902.  
  903. 9.  Author's  Address:
  904.  
  905.       Kannan Varadhan
  906.       Internet Engineer, OARnet,
  907.       1224, Kinnear Road,
  908.       Columbus, OH 43212-1136.
  909.  
  910.       Phone: (614) 292-4137
  911.  
  912.       Email: kannan@oar.net
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Varadhan                                                       [Page 17]
  955.